home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / dos / communic / pcmail / main / msd_dir.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-05  |  1.0 KB  |  73 lines

  1. /*
  2.  
  3.  * @(#)msd_dir.h 1.4 87/11/06    Public Domain.
  4.  
  5.  *
  6.  
  7.  *  A public domain implementation of BSD directory routines for
  8.  
  9.  *  MS-DOS.  Written by Michael Rendell ({uunet,utai}michael@garfield),
  10.  
  11.  *  August 1897
  12.  
  13.  */
  14.  
  15.  
  16.  
  17. #define    rewinddir(dirp)    seekdir(dirp, 0L)
  18.  
  19.  
  20.  
  21. #define    MAXNAMLEN    12
  22.  
  23.  
  24.  
  25. struct direct {
  26.  
  27.     ino_t    d_ino;            /* a bit of a farce */
  28.  
  29.     int    d_reclen;        /* more farce */
  30.  
  31.     int    d_namlen;        /* length of d_name */
  32.  
  33.     char    d_name[MAXNAMLEN + 1];        /* garentee null termination */
  34.  
  35. };
  36.  
  37.  
  38.  
  39. struct _dircontents {
  40.  
  41.     char    *_d_entry;
  42.  
  43.     struct _dircontents    *_d_next;
  44.  
  45. };
  46.  
  47.  
  48.  
  49. typedef struct _dirdesc {
  50.  
  51.     int        dd_id;    /* uniquely identify each open directory */
  52.  
  53.     long        dd_loc;    /* where we are in directory entry is this */
  54.  
  55.     struct _dircontents    *dd_contents;    /* pointer to contents of dir */
  56.  
  57.     struct _dircontents    *dd_cp;    /* pointer to current position */
  58.  
  59. } DIR;
  60.  
  61.  
  62.  
  63. extern    DIR        *opendir();
  64.  
  65. extern    struct direct    *readdir();
  66.  
  67. extern    void        seekdir();
  68.  
  69. extern    long        telldir();
  70.  
  71. extern    void        closedir();
  72.  
  73.